home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ODE(1) GNU Plotting Utilities ODE(1)
-
-
- NNAAMMEE
- ode - numerical solution of ordinary differential equa
- tions
-
- SSYYNNOOPPSSIISS
- ooddee [ _o_p_t_i_o_n_s ] [ _f_i_l_e ]
-
- DDEESSCCRRIIPPTTIIOONN
- ooddee is a tool that solves, by numerical integration, the
- initial value problem for a specified system of first-
- order ordinary differential equations. Three distinct
- numerical integration schemes are available:
- Runge-Kutta-Fehlberg (the default), Adams-Moulton, and
- Euler. The Adams-Moulton and Runge-Kutta schemes are
- available with adaptive step size.
-
- The operation of ooddee is specified by a program, written in
- its input language. The program is simply a list of
- expressions for the derivatives of the variables to be
- integrated, together with some control statements. Some
- examples are given in the EEXXAAMMPPLLEESS section.
-
- ooddee reads the program from the specified file, or from
- standard input if no file name is given. If reading from
- standard input, ooddee will stop reading and exit when it
- sees a single period on a line by itself.
-
- At each time step, the values of variables specified in
- the program are written to standard output. So a table of
- values will be produced, with each column showing the evo
- lution of a variable. If there are only two columns, the
- output can be piped to ggrraapphh(1) or a similar plotting pro
- gram.
-
- OOPPTTIIOONNSS
- IInnppuutt OOppttiioonnss
- --ff _f_i_l_e
- ----iinnppuutt--ffiillee _f_i_l_e
- Read input from _f_i_l_e before reading from standard
- input. This option makes it possible to work
- interactively, after reading a program fragment
- that defines the system of differential equations.
-
- OOuuttppuutt OOppttiioonnss
- --pp _p_r_e_c
- ----pprreecciissiioonn _p_r_e_c
- When printing numerical results, use _p_r_e_c signifi
- cant digits (the default is 6). If this option is
- given, the print format will be scientific nota
- tion.
-
- --tt
- ----ttiittllee
- Print a title line at the head of the output,
-
-
-
- FSF Dec 1998 1
-
-
-
-
-
- ODE(1) GNU Plotting Utilities ODE(1)
-
-
- naming the variables in each column. If this
- option is given, the print format will be scien
- tific notation.
-
- IInntteeggrraattiioonn SScchheemmee OOppttiioonnss
- The following options specify the numerical integration
- scheme. Only one of the three basic options --RR, --AA, --EE
- may be specified. The default is --RR
- (Runge-Kutta-Fehlberg).
-
- --RR _[_s_t_e_p_s_i_z_e_]
- ----rruunnggee--kkuuttttaa _[_s_t_e_p_s_i_z_e_]
- Use a fifth-order Runge-Kutta-Fehlberg algorithm,
- with an adaptive stepsize unless a constant step
- size is specified. When a constant stepsize is
- specified and no error analysis is requested, then
- a classical fourth-order Runge-Kutta scheme is
- used.
-
- --AA _[_s_t_e_p_s_i_z_e_]
- ----aaddaammss--mmoouullttoonn _[_s_t_e_p_s_i_z_e_]
- Use a fourth-order Adams-Moulton predictor-correc
- tor scheme, with an adaptive stepsize unless a con
- stant stepsize, _s_t_e_p_s_i_z_e, is specified. The
- Runge-Kutta-Fehlberg algorithm is used to get past
- `bad' points (if any).
-
- --EE _[_s_t_e_p_s_i_z_e_]
- ----eeuulleerr _[_s_t_e_p_s_i_z_e_]
- Use a `quick and dirty' Euler scheme, with a con
- stant stepsize. The default value of _s_t_e_p_s_i_z_e is
- 0.1. Not recommended for serious applications.
-
- The error bound options --rr and --ee (see below) may
- not be used if --EE is specified.
-
- --hh _h_m_i_n _[_h_m_a_x_]
- ----sstteepp--ssiizzee--bboouunndd _h_m_i_n _[_h_m_a_x_]
- Use a lower bound _h_m_i_n on the stepsize. The numer
- ical scheme will not let the stepsize go below
- _h_m_i_n. The default is to allow the stepsize to
- shrink to the machine limit, i.e., the minimum
- nonzero double-precision floating point number.
-
- The optional argument _h_m_a_x, if included, specifies
- a maximum value for the stepsize. It is useful in
- preventing the numerical routine from skipping
- quickly over an interesting region.
-
- EErrrroorr BBoouunndd OOppttiioonnss
- --rr _r_m_a_x _[_r_m_i_n_]
- ----rreellaattiivvee--eerrrroorr--bboouunndd _r_m_a_x _[_r_m_i_n_]
- The --rr option sets an upper bound on the relative
- single-step error. If the --rr option is used, the
-
-
-
- FSF Dec 1998 2
-
-
-
-
-
- ODE(1) GNU Plotting Utilities ODE(1)
-
-
- relative single-step error in any dependent vari
- able will never exceed _r_m_a_x (the default for which
- is 10^-9). If this should occur, the solution will
- be abandoned and an error message will be printed.
- If the stepsize is not constant, the stepsize will
- be decreased `adaptively', so that the upper bound
- on the single-step error is not violated. Thus,
- choosing a smaller upper bound on the single-step
- error will cause smaller stepsizes to be chosen. A
- lower bound _r_m_i_n may optionally be specified, to
- suggest when the stepsize should be increased (the
- default for _r_m_i_n is _r_m_a_x/1000).
-
- --ee _e_m_a_x _[_e_m_i_n_]
- ----aabbssoolluuttee--eerrrroorr--bboouunndd _e_m_a_x _[_e_m_i_n_]
- Similar to --rr, but bounds the absolute rather than
- the relative single-step error.
-
- --ss
- ----ssuupppprreessss--eerrrroorr--bboouunndd
- Suppress the ceiling on single-step error, allowing
- ooddee to continue even if this ceiling is exceeded.
- This may result in large numerical errors.
-
- IInnffoorrmmaattiioonnaall OOppttiioonnss
- ----hheellpp Print a list of command-line options, and exit.
-
- ----vveerrssiioonn
- Print the version number of ooddee and the plotting
- utilities package, and exit.
-
- DDIIAAGGNNOOSSTTIICCSS
- Mostly self-explanatory. The biggest exception is `syntax
- error', meaning there is a grammatical error. Language
- error messages are of the form
-
- ooddee:: nnnnnn:: mmeessssaaggee......
-
- where `nnn' is the number of the input line containing the
- error. If the --ff option is used, the phrase "(file)" fol
- lows the `nnn' for errors encountered inside the file.
- Subsequently, when ooddee begins reading the standard input,
- line numbers start over from 1.
-
- No effort is made to recover successfully from syntactic
- errors in the input. However, there is a meager effort to
- resynchronize so more than one error can be found in one
- scan.
-
- Run-time errors elicit a message describing the problem,
- and the solution is abandoned.
-
- EEXXAAMMPPLLEESS
- The program
-
-
-
- FSF Dec 1998 3
-
-
-
-
-
- ODE(1) GNU Plotting Utilities ODE(1)
-
-
- yy'' == yy
- yy == 11
- pprriinntt tt,, yy
- sstteepp 00,, 11
-
- solves an initial value problem whose solution is _y_=_e_^_t.
- When ooddee runs this program, it will write two columns of
- numbers to standard output. Each line will show the value
- of the independent variable _t, and the variable _y, as _t is
- stepped from 0 to 1.
-
- A more sophisticated example would be
-
- ssiinnee'' == ccoossiinnee
- ccoossiinnee'' == --ssiinnee
- ssiinnee == 00
- ccoossiinnee == 11
- pprriinntt tt,, ssiinnee
- sstteepp 00,, 22**PPII
-
- This program solves an initial value problem for a system
- of two differential equations. The initial value problem
- turns out to define the sine and cosine functions. The
- program steps the system over a full period.
-
- AAUUTTHHOORRSS
- ooddee was written by Nicholas B. Tufillaro (nnbbtt@@rreeeedd..eedduu),
- and slightly enhanced by Robert S. Maier (rrssmm@@mmaatthh..aarrii
- zzoonnaa..eedduu) to merge it into the GNU plotting utilities.
-
- SSEEEE AALLSSOO
- "The GNU Plotting Utilities Manual".
-
- BBUUGGSS
- Email bug reports to bbuugg--ggnnuu--uuttiillss@@ggnnuu..oorrgg.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FSF Dec 1998 4
-
-
-